package leetcode.code011;

import leetcode.IDebug;
import leetcode.helper.HelpDebug;

public abstract class Solution011 implements IDebug {

	public abstract int maxArea(int[] height);

	private void debug(String temp, int expect) {
		int[] height = HelpDebug.str2array3(temp);
		int result = this.maxArea(height);
		HelpDebug.compare(expect, result);
	}

	@Override
	public void debug1() {
		String temp = "[1,8,6,2,5,4,8,3,7]";
		int expect = 49;
		this.debug(temp, expect);
	}

	@Override
	public void debug2() {
		String temp = "[1,1]";
		int expect = 1;
		this.debug(temp, expect);
	}

	@Override
	public void debug3() {
		String temp = "[4,3,2,1,4]";
		int expect = 16;
		this.debug(temp, expect);
	}

	@Override
	public void debug4() {
		String temp = "[1,2,1]";
		int expect = 2;
		this.debug(temp, expect);
	}

}
